<?php
$title = "관리자메인";
$menu = 0;
require_once ('./admin.head.php');
if(!$_POST && !$_SESSION) :
?>
<form method="post">
<table width="100%">
    <tr>
<td bgcolor="#d5d5d5"><img width="92" height="34" src="images/login_title.gif"/></td>
    </tr>
<tr> 
                <td bgcolor="#ededed"><table width="100%" cellspacing="0" cellpadding="0" border="0">
                    <tbody><tr> 
                      <td width="233" height="80"><table width="100%" cellspacing="0" cellpadding="0" border="0">
                          <tbody><tr> 
                            <td width="70" align="center"><img width="57" height="20" src="images/login_title_id.gif"/></td>
                            <td><input type="text" name="mb_id"/></td>
                          </tr>
                          <tr> 
                            <td width="70" align="center"><img width="57" height="20" src="images/login_title_pw.gif"/></td>
                            <td><input type="password" name="mb_password"/></td>
                          </tr>
                        </tbody></table></td>
                      <td><input type="image" width="83" height="46" border="0" src="images/login_but_enter.gif"/></td>
                    </tr>
                  </tbody></table></td>
              </tr>
</table>
</form>
<?php 
elseif(!$_SESSION) :
//로그인 프로세스
    chdir('../bbs');
    $url = $_SERVER['PHP_SELF'];
    require_once 'login_check.php';
    chdir(dirname(__FILE__));
?>
<?php
else :
    $mb_id = $_SESSION['ss_mb_id'];
    list($mb_name) = mysql_fetch_row(mysql_query("SELECT mb_name FROM g4_member WHERE mb_id = '$mb_id'"));
?>
<table width="100%">
    <tr>
<td bgcolor="#d5d5d5"><img width="92" height="34" src="images/login_title.gif"/></td>
    </tr>
<tr> 
                <td bgcolor="#ededed"><?php echo $mb_name?>님 환영합니다!</td>
              </tr>
</table>
<?php
endif;
?>
<?php
require_once ('./admin.foot.php');
?>
